package com.kingwang.training.designpattern.state.bo;

/**
 * 电梯运行
 */
public class RunState implements LiftState {
    @Override
    public LiftState open() {
        System.out.println("运行状态下无法打开电梯门");
        return this;
    }

    @Override
    public LiftState close() {
        System.out.println("运行状态下电梯门已关闭");
        return this;
    }

    @Override
    public LiftState run() {
        System.out.println("电梯正在运行");
        return this;
    }

    @Override
    public LiftState stop() {
        System.out.println("电梯停靠");
        return new StopState();
    }

    @Override
    public void doSomething() {
        System.out.println("RUN do something");
    }
}
